<include file="public@header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('index')}">售电公司列表</a></li>
			<if condition="auth_check('add')">
				<li><a href="{:url('add')}">添加</a></li>
			</if>
		</ul>
		<form class="well form-inline margin-top-20" method="post" action="{:url('index')}">
			关键字:
			<input type="text" class="form-control" name="keyword" style="width: 200px;"
				   value="{$where_r.keyword|default=''}" placeholder="请输入关键字...">
			公示类型：
			<select  class="form-control" name="publicity">
				<option value="0">未选择</option>
				<volist name="publicity" id="vo">
					<option value="{$vo.id}" <eq name="vo.id" value="$where_r.publicity|default=0">selected</eq> >{$vo.name}</option>
				</volist>
			</select>
			<input type="submit" class="btn btn-primary" value="搜索"/>
			<a class="btn btn-danger" href="{:url('index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>公司名称</th>
					<th>法人</th>
					<th>注册地</th>
					<th>成立时间</th>
					<th>联系电话</th>
					<th>公示状态</th>
					<th>录入人</th>
					<th width="130">{:lang('ACTIONS')}</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="lists" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.company}</td>
					<td>{$vo.corporation}</td>
					<td>{$vo.aname}</td>
					<td>{$vo.regtime|date="Y-m-d",###}</td>
					<td>{$vo.phone}</td>
					<td>{$vo.cname}</td>
					<td>{$vo.user_nickname}</td>
					<td>
						<if condition="auth_check('edit')">
							<a href='{:url("edit",array("id"=>$vo["id"]))}'>编辑</a>
						</if>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}<li><a>共计 {$lists->total()} 条</a></li></div>
	</div>
	<script src="__STATIC__/js/admin.js"></script>
</body>
</html>